# 测试用例类
import unittest, time
from page_object.page_object_01.Page import Page
from selenium import webdriver


class TestCase(unittest.TestCase):
    def setUp(self) -> None:
        self.driver = webdriver.Firefox()
        self.driver.maximize_window()
        # 实例化页面类
        self.po = Page(self.driver)

    def tearDown(self) -> None:
        time.sleep(10)
        self.driver.quit()

    def test_01_baidu(self):
        self.po.open_url('https://www.baidu.com/')
        self.po.search()
        self.po.btn_baidu_click()
        self.po.set_move_to_element()
        self.po.set_search_click()

    def test_02_jiuxian(self):
        self.po.open_url('https://www.jiuxian.com/')


if __name__ == '__main__':
    unittest.main()
